package com.xipu.yygh.model.hosp;

import com.xipu.yygh.model.base.BaseMongoEntity;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * <p>
 * Hospital
 * </p>
 *
 * @author qy
 */
@Data
@Document("Hospital")
public class Hospital extends BaseMongoEntity {

    private static final long serialVersionUID = 1L;

    // 医院编号,唯一索引
    //@Indexed(unique = true)
    private String hoscode;

    // 医院名称,普通索引
    //@Indexed
    private String hosname;

    // 医院类型
    private String hostype;

    // 省code
    private String provinceCode;

    // 市code
    private String cityCode;

    // 区code
    private String districtCode;

    // 详情地址
    private String address;

    // 医院logo
    private String logoData;

    // 医院简介
    private String intro;

    // 坐车路线
    private String route;

    // 状态 0：未上线 1：已上线
    private Integer status;

    // 预约规则
    private BookingRule bookingRule;

    public void setBookingRule(String bookingRule) {
        this.bookingRule = JSONObject.parseObject(bookingRule, BookingRule.class);
    }

}

